package com.dragon.modules.yuegou.query.order;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.order.OrderRefundDetailEntity;
import com.dragon.modules.yuegou.enums.order.OrderRefundDetailUserType;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 退款明细(单品) 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2019-08-17 15:16:41
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class OrderRefundDetailQuery extends OrderRefundDetailEntity implements Query<OrderRefundDetailEntity> {

    /** 查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 订单号查询条件 */
	@JsonUnwrapped(prefix = "orderNo")
	private Condition<String> orderNoCondition;

    /** 订单单品id查询条件 */
	@JsonUnwrapped(prefix = "goodsId")
	private Condition<String> goodsIdCondition;

    /** 退款配注查询条件 */
	@JsonUnwrapped(prefix = "remarks")
	private Condition<String> remarksCondition;

    /** 退款金额查询条件 */
	@JsonUnwrapped(prefix = "amount")
	private Condition<BigDecimal> amountCondition;

    /** [枚举]用户类型：0-系统-SYSTEM、1-会员-MEMBER、2-用户-USER查询条件 */
	@JsonUnwrapped(prefix = "userType")
	private Condition<OrderRefundDetailUserType> userTypeCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "createdBy")
	private Condition<String> createdByCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "createdTime")
	private Condition<LocalDateTime> createdTimeCondition;

    /** 订单退款id查询条件 */
	@JsonUnwrapped(prefix = "refundId")
	private Condition<String> refundIdCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public OrderRefundDetailQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public OrderRefundDetailQuery(OrderRefundDetailEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public OrderRefundDetailQuery(OrderRefundDetailQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.orderNoCondition != null) {
			this.orderNoCondition = other.orderNoCondition.copy();
		}
		if(other.goodsIdCondition != null) {
			this.goodsIdCondition = other.goodsIdCondition.copy();
		}
		if(other.remarksCondition != null) {
			this.remarksCondition = other.remarksCondition.copy();
		}
		if(other.amountCondition != null) {
			this.amountCondition = other.amountCondition.copy();
		}
		if(other.userTypeCondition != null) {
			this.userTypeCondition = other.userTypeCondition.copy();
		}
		if(other.createdByCondition != null) {
			this.createdByCondition = other.createdByCondition.copy();
		}
		if(other.createdTimeCondition != null) {
			this.createdTimeCondition = other.createdTimeCondition.copy();
		}
		if(other.refundIdCondition != null) {
			this.refundIdCondition = other.refundIdCondition.copy();
		}
	}

	@Override
	public QueryWrapper<OrderRefundDetailEntity> toQueryWrapper() {
		QueryWrapper<OrderRefundDetailEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (orderNoCondition != null) {
			orderNoCondition.toWrapper(wrapper, COL_ORDER_NO);
		}
		if (goodsIdCondition != null) {
			goodsIdCondition.toWrapper(wrapper, COL_GOODS_ID);
		}
		if (remarksCondition != null) {
			remarksCondition.toWrapper(wrapper, COL_REMARKS);
		}
		if (amountCondition != null) {
			amountCondition.toWrapper(wrapper, COL_AMOUNT);
		}
		if (userTypeCondition != null) {
			userTypeCondition.toWrapper(wrapper, COL_USER_TYPE);
		}
		if (createdByCondition != null) {
			createdByCondition.toWrapper(wrapper, COL_CREATED_BY);
		}
		if (createdTimeCondition != null) {
			createdTimeCondition.toWrapper(wrapper, COL_CREATED_TIME);
		}
		if (refundIdCondition != null) {
			refundIdCondition.toWrapper(wrapper, COL_REFUND_ID);
		}
		return wrapper;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param idCondition 查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回订单号查询条件
	 * 
	 * @return orderNoCondition 订单号查询条件
	 */
	public Condition<String> orderNo() {
		this.orderNoCondition = new Condition<>();
		return this.orderNoCondition;
	}
	
	/**
	 * 获取订单号查询条件
	 * 
	 * @return orderNoCondition 订单号查询条件
	 */
	public Condition<String> getOrderNoCondition() {
		return orderNoCondition;
	}

	/**
	 * 设置订单号查询条件
	 * 
	 * @param orderNoCondition 订单号查询条件
	 */
	public void setOrderNoCondition(Condition<String> orderNoCondition) {
		this.orderNoCondition = orderNoCondition;
	}

	/**
	 * 构造并返回订单单品id查询条件
	 * 
	 * @return goodsIdCondition 订单单品id查询条件
	 */
	public Condition<String> goodsId() {
		this.goodsIdCondition = new Condition<>();
		return this.goodsIdCondition;
	}
	
	/**
	 * 获取订单单品id查询条件
	 * 
	 * @return goodsIdCondition 订单单品id查询条件
	 */
	public Condition<String> getGoodsIdCondition() {
		return goodsIdCondition;
	}

	/**
	 * 设置订单单品id查询条件
	 * 
	 * @param goodsIdCondition 订单单品id查询条件
	 */
	public void setGoodsIdCondition(Condition<String> goodsIdCondition) {
		this.goodsIdCondition = goodsIdCondition;
	}

	/**
	 * 构造并返回退款配注查询条件
	 * 
	 * @return remarksCondition 退款配注查询条件
	 */
	public Condition<String> remarks() {
		this.remarksCondition = new Condition<>();
		return this.remarksCondition;
	}
	
	/**
	 * 获取退款配注查询条件
	 * 
	 * @return remarksCondition 退款配注查询条件
	 */
	public Condition<String> getRemarksCondition() {
		return remarksCondition;
	}

	/**
	 * 设置退款配注查询条件
	 * 
	 * @param remarksCondition 退款配注查询条件
	 */
	public void setRemarksCondition(Condition<String> remarksCondition) {
		this.remarksCondition = remarksCondition;
	}

	/**
	 * 构造并返回退款金额查询条件
	 * 
	 * @return amountCondition 退款金额查询条件
	 */
	public Condition<BigDecimal> amount() {
		this.amountCondition = new Condition<>();
		return this.amountCondition;
	}
	
	/**
	 * 获取退款金额查询条件
	 * 
	 * @return amountCondition 退款金额查询条件
	 */
	public Condition<BigDecimal> getAmountCondition() {
		return amountCondition;
	}

	/**
	 * 设置退款金额查询条件
	 * 
	 * @param amountCondition 退款金额查询条件
	 */
	public void setAmountCondition(Condition<BigDecimal> amountCondition) {
		this.amountCondition = amountCondition;
	}

	/**
	 * 构造并返回[枚举]用户类型：0-系统-SYSTEM、1-会员-MEMBER、2-用户-USER查询条件
	 * 
	 * @return userTypeCondition [枚举]用户类型：0-系统-SYSTEM、1-会员-MEMBER、2-用户-USER查询条件
	 */
	public Condition<OrderRefundDetailUserType> userType() {
		this.userTypeCondition = new Condition<>();
		return this.userTypeCondition;
	}
	
	/**
	 * 获取[枚举]用户类型：0-系统-SYSTEM、1-会员-MEMBER、2-用户-USER查询条件
	 * 
	 * @return userTypeCondition [枚举]用户类型：0-系统-SYSTEM、1-会员-MEMBER、2-用户-USER查询条件
	 */
	public Condition<OrderRefundDetailUserType> getUserTypeCondition() {
		return userTypeCondition;
	}

	/**
	 * 设置[枚举]用户类型：0-系统-SYSTEM、1-会员-MEMBER、2-用户-USER查询条件
	 * 
	 * @param userTypeCondition [枚举]用户类型：0-系统-SYSTEM、1-会员-MEMBER、2-用户-USER查询条件
	 */
	public void setUserTypeCondition(Condition<OrderRefundDetailUserType> userTypeCondition) {
		this.userTypeCondition = userTypeCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return createdByCondition 查询条件
	 */
	public Condition<String> createdBy() {
		this.createdByCondition = new Condition<>();
		return this.createdByCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return createdByCondition 查询条件
	 */
	public Condition<String> getCreatedByCondition() {
		return createdByCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param createdByCondition 查询条件
	 */
	public void setCreatedByCondition(Condition<String> createdByCondition) {
		this.createdByCondition = createdByCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return createdTimeCondition 查询条件
	 */
	public Condition<LocalDateTime> createdTime() {
		this.createdTimeCondition = new Condition<>();
		return this.createdTimeCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return createdTimeCondition 查询条件
	 */
	public Condition<LocalDateTime> getCreatedTimeCondition() {
		return createdTimeCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param createdTimeCondition 查询条件
	 */
	public void setCreatedTimeCondition(Condition<LocalDateTime> createdTimeCondition) {
		this.createdTimeCondition = createdTimeCondition;
	}

	/**
	 * 构造并返回订单退款id查询条件
	 * 
	 * @return refundIdCondition 订单退款id查询条件
	 */
	public Condition<String> refundId() {
		this.refundIdCondition = new Condition<>();
		return this.refundIdCondition;
	}
	
	/**
	 * 获取订单退款id查询条件
	 * 
	 * @return refundIdCondition 订单退款id查询条件
	 */
	public Condition<String> getRefundIdCondition() {
		return refundIdCondition;
	}

	/**
	 * 设置订单退款id查询条件
	 * 
	 * @param refundIdCondition 订单退款id查询条件
	 */
	public void setRefundIdCondition(Condition<String> refundIdCondition) {
		this.refundIdCondition = refundIdCondition;
	}

}
